package cn.ex.ymcc.feign;

import cn.ex.ymcc.doc.CourseDoc;
import cn.ex.ymcc.feign.fallback.ESCourseFeignClientFallbackFactory;
import cn.ex.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "service-search",fallbackFactory = ESCourseFeignClientFallbackFactory.class)
public interface ESCourseFeignClient {

    @RequestMapping(value = "/course/addCourse",method = RequestMethod.POST)
    JSONResult onLineCourse(@RequestBody CourseDoc doc);


    @GetMapping("/course/offLineCourse/{courseId}")
    JSONResult offLineCourse(@PathVariable("courseId") Long courseId);


}
